﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for UserEntity
/// </summary>
public class UserEntity
{
    private bool _isLogin;
    public bool isLogin
    {
        get { return _isLogin; }
        set { _isLogin = value; }
    }
    private string _Account;
    public string Account
    {
        get { return _Account; }
        set { _Account = value; }
    }
    private string _Password;
    public string Password
    {
        get { return _Password; }
        set { _Password = value; }
    }
    private bool _Active;
    public bool Active
    {
        get { return _Active; }
        set { _Active = value; }
    }
    private string _Mail;
    public string Mail
    {
        get { return _Mail; }
        set { _Mail = value; }
    }

    public System.Nullable<System.DateTime> DateCreate { get; set; }

    private long _RoleID;
    public long RoleID
    {
        get { return _RoleID; }
        set { _RoleID = value; }
    }
    private string _Token;
    public string Token
    {
        get { return _Token; }
        set { _Token = value; }
    }
   
    //Constructor with 0 argument.
    public UserEntity()
    {
        _isLogin = false;
    }
    public UserEntity(User u)
    {
        this._Account = u.Account;
        this._Password = u.Password;
        this._Active = u.Active.Value;
        DateCreate = u.DateCreate;
        this._RoleID = (long) u.RoleID;
        this._Token = u.Token;
        this._Mail = u.Mail;
        _isLogin = false;
    }
}